package com.medicine.product.dto;

import com.medicine.product.utils.DateUtils;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @Author sayid
 * @create 2020/9/15 18:32
 * com.vdf.pms.childprotect.vo
 */
@Data
public class HospitalOrderListVo {

    @ApiModelProperty("社区名称")
    private String shname;


    @ApiModelProperty("社区id")
    private String shospitalid;

    @ApiModelProperty("创建日期")
    private String createTime;

    @ApiModelProperty("视力筛查数量")
    private Long eyesightCount;

    @ApiModelProperty("视力筛查营收")
    private BigDecimal eyesightSum;


    @ApiModelProperty("骨密度数量")
    private Long bmdCount;

    @ApiModelProperty("骨密度营收")
    private BigDecimal bmdSum;

    @ApiModelProperty("听力数量")
    private Long hearingCount;

    @ApiModelProperty("听力应收")
    private BigDecimal hearingSum;

    @ApiModelProperty("订单总数量")
    private Long totalCount;

    @ApiModelProperty("订单总营收")
    private BigDecimal orderSum;

    @ApiModelProperty("gmv")
    private BigDecimal gmv;

    @ApiModelProperty("视力营收gmv")
    private BigDecimal eyeGmv;

    @ApiModelProperty("订单营收gmv")
    private BigDecimal bmdGmv;

    @ApiModelProperty("听力订单营收gmv")
    private BigDecimal hearingGmv;

    @ApiModelProperty("毛利")
    private BigDecimal grossProfit;

    @ApiModelProperty("同比")
    private BigDecimal y2y;

    @ApiModelProperty("环比")
    private BigDecimal m2m;

    @ApiModelProperty("地区")
    private String sarea;

    @ApiModelProperty("省份")
    private String provinceName;


    @ApiModelProperty("护士成本")
    private BigDecimal iprice;

    @ApiModelProperty("医生成本")
    private BigDecimal totaldprice;

    @ApiModelProperty("视力医生成本")
    private BigDecimal eyedprice;

    @ApiModelProperty("骨密度医生成本")
    private BigDecimal bmddprice;

    @ApiModelProperty("听力医生成本")
    private BigDecimal hearingdprice;

    @ApiModelProperty("分成系数")
    private BigDecimal ratio;

    @ApiModelProperty("医院补贴")
    private BigDecimal hospitalPrice;

    @ApiModelProperty("龋齿数量")
    private Long cariesCount;

    @ApiModelProperty("龋齿营收")
    private BigDecimal cariesSum;

    @ApiModelProperty("龋齿订单gmv")
    private BigDecimal cariesGmv;

    @ApiModelProperty("龋齿医生成本")
    private BigDecimal cariesdprice;

    @ApiModelProperty("订单时间")
    private String stime;

    @ApiModelProperty("开票名称")
    private String invoiceName;


    public Map<String,String> toMap(){
        Map<String,String> map = new HashMap<>();
        map.put("日期",  StringUtils.isNotEmpty(this.getStime())?this.stime:"");
        map.put("视力订单",this.getEyesightCount()!=null?this.eyesightCount.toString():"0");
        map.put("骨密度订单",this.getBmdCount()!=null?this.bmdCount.toString():"0");
        map.put("听力订单",this.getHearingCount()!=null?this.hearingCount.toString():"0");
        map.put("龋齿订单",this.getCariesCount()!=null?this.cariesCount.toString():"0");
        map.put("收款金额",this.getGmv()!=null?this.gmv.toString():"0");
        map.put("结算金额",this.getOrderSum()!=null?this.orderSum.toString():"0");

        return map;
    }

    public static List<String> getTagNameList(){
        List<String> tagNameList = new ArrayList<>();
        tagNameList.add("日期");
        tagNameList.add("视力订单");
        tagNameList.add("骨密度订单");
        tagNameList.add("听力订单");
        tagNameList.add("龋齿订单");
        tagNameList.add("收款金额");
        tagNameList.add("结算金额");
        return tagNameList;
    }

}
